
<div class="col-sm-3">
    <ul class="nav nav-pills nav-stacked">
        <li <%if(site_info.page.name.toLowerCase()=="essay"){%>class="active"<%}%>>
            <a href="/essay">
                <span class="glyphicon glyphicon-home"></span> 
                <span class="title">首页</span>
                <%if(site_info.page.name.toLowerCase()=="essay"){%>
                <span class="selected"></span>
                <%}%>
            </a>
        </li>
        <li <%if(site_info.page.name.toLowerCase()=="category"){%>class="active"<%}%>>
            <a href="/category">
                <span class="glyphicon glyphicon-th-list"></span> 
                <span class="title">分类</span>
                <%if(site_info.page.name.toLowerCase()=="category"){%>
                <span class="selected"></span>
                <%}%>
            </a>
        </li>
        <li <%if(site_info.page.name.toLowerCase()=="tag"){%>class="active"<%}%>>
            <a href="/tag">
                <span class="glyphicon glyphicon-tags"></span> 
                <span class="title">标签</span>
                <%if(site_info.page.name.toLowerCase()=="tag"){%>
                <span class="selected"></span>
                <%}%>
            </a>
        </li>          
        <%if(!!locals.user && locals.user.userId!=site_info.default.user_id){%>
        <li <%if(site_info.page.name.toLowerCase()=="profile"){%>class="active"<%}%>>
            <a href="/user/profile">
                <span class="glyphicon glyphicon-user"></span> 
                <span class="title">管理</span>
                <%if(site_info.page.name.toLowerCase()=="profile"){%>
                <span class="selected"></span>
                <%}%>
            </a>
        </li>
        <li <%if(site_info.page.name.toLowerCase()=="logout"){%>class="active"<%}%>>
            <a href="/logout">
                <span class="glyphicon glyphicon-log-out"></span> 
                <span class="title">退出</span>
                <%if(site_info.page.name.toLowerCase()=="logout"){%>
                <span class="selected"></span>
                <%}%>
            </a>
        </li>
        <%}else{%>
        <li <%if(site_info.page.name.toLowerCase()=="login"){%>class="active"<%}%>>
            <a href="/login">
                <span class="glyphicon glyphicon-log-in"></span> 
                <span class="title">登录</span>
                <%if(site_info.page.name.toLowerCase()=="login"){%>
                <span class="selected"></span>
                <%}%>
            </a>
        </li>
        <li <%if(site_info.page.name.toLowerCase()=="reg"){%>class="active"<%}%>>
            <a href="/reg">
                <span class="glyphicon glyphicon-plus"></span> 
                <span class="title">注册</span>
                <%if(site_info.page.name.toLowerCase()=="reg"){%>
                <span class="selected"></span>
                <%}%>
            </a>
        </li>
        <%}%>
        <%if(site_info.debug){%>
        <li <%if(site_info.page.name.toLowerCase()=="admin"){%>class="active"<%}%>>
            <a href="/admin" id="navSetting">
                <span class="glyphicon glyphicon-cog"></span> 
                <span class="title">设置</span>
                <%if(site_info.page.name.toLowerCase()=="admin"){%>
                <span class="selected"></span>
                <%}%>
            </a>
        </li>
        <%}%>
    </ul>
</div>
